/*******************************************************************************
*  file    : busywidget.cpp
*  created : 13.08.2012
*  author  : Slyshyk Oleksiy (alex312@meta.ua)
*******************************************************************************/

#include "busywidget.hpp"
#include <QBoxLayout>

BusyWidget::BusyWidget(QWidget *parent) :
    QWidget(parent)
{
    label_ = new QLabel(this);
    label_->setText(tr("Application busy..."));
    indicator_ = new QProgressIndicator(this);
    indicator_->setMinimumSize(20,20);
    indicator_->startAnimation();

    QHBoxLayout * layout = new QHBoxLayout();

    layout->addWidget(indicator_);
    layout->addWidget(label_);
    setLayout(layout);
    //resize(300,80);
}

QString BusyWidget::labelText() const
{
    return label_->text();
}


void BusyWidget::setLabelText(QString txt)
{
    label_->setText(txt);
}

